#ifndef __GRAVITY_H__
#define __GRAVITY_H__

#include <list>
#include "solid.h"
#include "particle.h"
#include <cmath>

class Gravity{
	private:
		float gravityAccel;
		std::list<PtrSolid> objects;
		std::list<Particle*> particles;

	public:
		Gravity(float gravityAccel);
		~Gravity();

		void clear();

		void addParticle(Particle* particle);

		void removeParticle(Particle* particle);

		void addSolid(Solid* solid);

		void removeSolid(Solid* solid);

		// Los objetos solidos colisionan entre si
		void checkSolidCollisions();

		// Las particulas solo colisionan con objetos solidos.
		void checkParticleCollisions();

		void advanceTime();
};

#endif // __GRAVITY_H__
